package cn.edu.ctgu.junitTest;


public class Sale {
    public static double saleMoney(int lock,int stock,int barrel){
        int totalMoney=0;
        totalMoney=45*lock+30*stock+25*barrel;
        double commission=0;
        if(totalMoney>0&&totalMoney<=1000) {
            commission = totalMoney*0.1;
        }
        else if(totalMoney>1000&&totalMoney<=1800){
            commission=100+(totalMoney-1000)*0.15;
        }
        else{
            commission=220+(totalMoney-1800)*0.2;
        }
        return commission;
    }
}
